package com.huawei;
import java.util.Scanner;

/**
 * Created by Z-hong on 2024/7/2.
 */

public class HJ9 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();
        char arr[]=str.toCharArray();
        int numFlag[]=new int[10];
        StringBuffer sb=new StringBuffer();
        for(int i=arr.length-1;i>=0;i--){
            if(numFlag[arr[i]-'0']!=1){
                sb.append(arr[i]);
                numFlag[arr[i]-'0']=1;
            }
        }
        System.out.println(sb.toString());
    }
}
